package com.chen.springbootswagger.utils;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@ApiModel(description = "响应对象")
@Getter
@Setter
@AllArgsConstructor
public class BaseResult<T> {

    private static final int SUCCESS_CODE = 0;
    private static final String SUCCESS_MSG = "ok";

    @ApiModelProperty(value = "响应消息",name = "msg",required = true,example = "" + SUCCESS_CODE)
    private int code;

    @ApiModelProperty(value = "响应消息",name = "msg")
    private String msg;

    @ApiModelProperty(value = "响应数据",name = "data")
    private T data;
}
